<?php
namespace Admin\Model;
use Think\Model;

//++++++++++++++无限级分类++++++++++++++

class VidoModel extends Model { 
 public function getVido(){
        $av = $this->table(array('vido'=>'v','type'=>'t','goods'=>'g'))->field('v.*,v.id vid,t.name,t.id tid,g.*')->where('v.typeid=t.id AND  v.goodsid = g.id ')->select();

        foreach($av as $key => $val){
            date_default_timezone_set("PRC");  //设置中国时区
            $av[$key]['addtime'] = date('Y-m-d H:i:s',$val['addtime']);
          }
          return $av;
       }
  }